package com.lxd.milktea.dao;

import com.lxd.milktea.dataobject.MaterialRe;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * @ProjectName: milktea
 * @Package: com.lxd.milktea.dao
 * @ClassName: materialDao
 * @Author: carrymaniac
 * @Description:
 * @Date: 2020/5/2 5:45 下午
 * @Version:
 */
@Repository
public interface MaterialReRepository extends JpaRepository<MaterialRe, Integer> {
    /**
     * 通过原料ID查询原料
     * @param MaterialId
     * @return
     */
    LinkedList<MaterialRe> findAllByMaterialId(String MaterialId);

    /**
     * 通过父原料ID查询原料
     */
    void deleteAllByMaterialId(String MaterialID);
}
